import axios from "../utils/request"

// 请求中： 请求参数和返回值的类型都需要进行约束
export const reqUserList = (data: ParamsReq) => axios.post("/api/user/list", data);
//添加角色
export const addUser = (data: RoleAddReq) => axios.post("/api/Admin/add", data)
//编辑角色
export const editUser = (data: RoleAddReq) => axios.post("/api/Admin/edit", data)
//删除角色
export const deleteUser = (data: RoleAddReq) => axios.post("/api/Admin/delete", data)
//上传图片
export const upload = (data: any) => axios.post("/api/Admin/upload", data, {
  headers: {
    'Content-Type': 'multipart/form-data'
  }
})
